﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using bitzhuwei.FeedingFrenzy.WorldModel;

namespace bitzhuwei.FeedingFrenzy
{
    public partial class FormGameWorldMonitor : Form
    {
        private GameWorld world;
        public FormGameWorldMonitor()
        {
            InitializeComponent();
        }
        public FormGameWorldMonitor(GameWorld world)
        {
            InitializeComponent();
            this.world = world;
        }

        private void FormGameWorldMonitor_Load(object sender, EventArgs e)
        {
            Application.Idle += new EventHandler(Application_Idle);
        }

        void Application_Idle(object sender, EventArgs e)
        {
            if (world != null)
            {
                this.txtInfo.Text = world.ToString();
            }
        }
    }
}
